﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CNDM.BO.GetData
{
    public class NewsClass
    {
        public class NewsList
        {
            public struct NewsListItem
            {
                public NewsListItem(string title, string image, string desc,string catID, string link, string newsid)
                {
                    Title = title;
                    Link = link;
                    Image = image;
                    Desc = desc;
                    NewsID = newsid;
                    CatID = catID;
                }

                public string Title, Link, Image, Desc, CatID, NewsID;
            }

            private NewsListItem[] m_NewsItems;
            public NewsListItem[] NewsItems
            {
                get { return this.m_NewsItems; }
                set { this.m_NewsItems = value; }
            }
        }

        public class NewsContent
        {
            public struct NewsContentItem
            {
                //public NewsContentItem(string title, string desc, string content, string image, string link)
                //{
                //    Title = title;
                //    Desc = desc;
                //    Content = content;
                //    Image = image;
                //    Link = link;
                //}

                public NewsContentItem(string title, string desc, string content, string image, string link, NewsList newsOherList )
                {
                    Title = title;
                    Desc = desc;
                    Content = content;
                    Image = image;
                    Link = link;
                    NewsOtherList = newsOherList;
                }

                public string Title, Desc, Content, Image, Link;
                public NewsList NewsOtherList;
            }

            private NewsContentItem m_NewsContentItem;
            public NewsContentItem NewsContentItems
            {
                get { return this.m_NewsContentItem; }
                set { m_NewsContentItem = value; }
            }
        }

        public class Category
        {
            public struct CategoryItem
            {
                public CategoryItem(string catname, string catID, string catparentID, string image, string countNews)
                {
                    CatName = catname;
                    CatID = catID;
                    CatParentID = catparentID;
                    Image = image;
                    CountNews = countNews;
                }

                public string CatName, CatID, CatParentID, Image, CountNews;
            }

            private CategoryItem[] m_CategoryItems;
            public CategoryItem[] CategoryItems
            {
                get { return this.m_CategoryItems; }
                set { this.m_CategoryItems = value; }
            }
        }

        public class CategoryAll
        {
            public struct CategoryList
            {
                public CategoryList(string catname, string catid, string catparentid, string image, List<Category.CategoryItem> arrCatItem)
                {
                    CatName = catname;
                    CatID = catid;
                    CatParentID = catparentid;
                    Image = image;
                    CatChilds = arrCatItem;
                }

                public string CatName, CatID, CatParentID, Image;
                public List<Category.CategoryItem> CatChilds;
            }

            private CategoryList[] m_CategoryItems;
            public CategoryList[] CategoryLists
            {
                get { return this.m_CategoryItems; }
                set { this.m_CategoryItems = value; }
            }
        }
    }
}
